﻿<DockPanel
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
            xmlns:s="clr-namespace:WpfLoadingLibrary;assembly=WpfLoadingLibrary" xmlns:System="clr-namespace:System;assembly=mscorlib" x:Class="SimpleControlLibrary.UI.GridViewControl" 
             mc:Ignorable="d" 
            x:Name="数据源" d:DesignHeight="300" d:DesignWidth="300" 
            >
    
    <Grid>
        
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition Height="28"/>
        </Grid.RowDefinitions>
        <Grid>
            <s:BusyIndicator x:Name="busyCtrl" Text="{Binding ViewModel.LoadText, Mode=TwoWay}" IsBusy="{Binding ViewModel.IsBusy}" />
            <DataGrid x:Name="dataGrid"              
                   CanUserResizeRows="False"  SelectionMode="Extended"
                  CanUserReorderColumns="False" AlternationCount="2"  RowHeaderWidth="0" CanUserAddRows="False">
               
            </DataGrid>
        </Grid>

        <StatusBar  Grid.Row="1">
            <Button Content="导出数据" x:Name="btnExcept" Command="{Binding ViewModel.ExceptToExcelCommand}"/>
            <Button Content="导出SQL" x:Name="btnExceptSQL" Command="{Binding ViewModel.ExceptToSqlCommand}" />
            <StatusBarItem HorizontalAlignment="Right">
                <TextBlock x:Name="lbTime" Text="{Binding ViewModel.ExecTime}" MinWidth="100"/>
            </StatusBarItem>

            <StatusBarItem HorizontalAlignment="Right">
                <TextBlock x:Name="lbCount" Text="{Binding ViewModel.DataCount}" MinWidth="300"/>
            </StatusBarItem>
        </StatusBar>

    </Grid>
</DockPanel>
